(0) Obligation:

Clauses:

gopher(nil, nil).
gopher(cons(nil, Y), cons(nil, Y)).
gopher(cons(cons(U, V), W), X) :- gopher(cons(U, cons(V, W)), X).
samefringe(nil, nil).
samefringe(cons(U, V), cons(X, Y)) :- ','(gopher(cons(U, V), cons(U1, V1)), ','(gopher(cons(X, Y), cons(X1, Y1)), samefringe(V1, Y1))).

Query: samefringe(g,g)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

gopherA(nil, T22, nil, T22).
gopherA(cons(T29, T30), T31, X44, X45) :- gopherA(T29, cons(T30, T31), X44, X45).
pB(nil, T15, nil, T15, T9, T10, X16, X17) :- gopherA(T9, T10, X16, X17).
pB(nil, T15, nil, T15, T9, T10, T16, T17) :- ','(gopherA(T9, T10, T16, T17), samefringeC(T15, T17)).
pB(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) :- pB(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17).
samefringeC(nil, nil).
samefringeC(cons(T7, T8), cons(T9, T10)) :- pB(T7, T8, X14, X15, T9, T10, X16, X17).

Query: samefringeC(g,g)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
samefringeC_in: (b,b)
pB_in: (b,b,f,f,b,b,f,f)
gopherA_in: (b,b,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

samefringeC_in_gg(nil, nil) → samefringeC_out_gg(nil, nil)
samefringeC_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, pB_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_in_ggaa(T9, T10, X16, X17))
gopherA_in_ggaa(nil, T22, nil, T22) → gopherA_out_ggaa(nil, T22, nil, T22)
gopherA_in_ggaa(cons(T29, T30), T31, X44, X45) → U1_ggaa(T29, T30, T31, X44, X45, gopherA_in_ggaa(T29, cons(T30, T31), X44, X45))
U1_ggaa(T29, T30, T31, X44, X45, gopherA_out_ggaa(T29, cons(T30, T31), X44, X45)) → gopherA_out_ggaa(cons(T29, T30), T31, X44, X45)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_out_ggaa(T9, T10, X16, X17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17) → U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_in_ggaa(T9, T10, T16, T17))
U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_in_gg(T15, T17))
U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_out_gg(T15, T17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17)
pB_in_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_in_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17))
U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_out_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17)) → pB_out_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, pB_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringeC_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringeC_in_gg(x1, x2)  =  samefringeC_in_gg(x1, x2)
nil  =  nil
samefringeC_out_gg(x1, x2)  =  samefringeC_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
pB_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopherA_in_ggaa(x1, x2, x3, x4)  =  gopherA_in_ggaa(x1, x2)
gopherA_out_ggaa(x1, x2, x3, x4)  =  gopherA_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
pB_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

samefringeC_in_gg(nil, nil) → samefringeC_out_gg(nil, nil)
samefringeC_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, pB_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_in_ggaa(T9, T10, X16, X17))
gopherA_in_ggaa(nil, T22, nil, T22) → gopherA_out_ggaa(nil, T22, nil, T22)
gopherA_in_ggaa(cons(T29, T30), T31, X44, X45) → U1_ggaa(T29, T30, T31, X44, X45, gopherA_in_ggaa(T29, cons(T30, T31), X44, X45))
U1_ggaa(T29, T30, T31, X44, X45, gopherA_out_ggaa(T29, cons(T30, T31), X44, X45)) → gopherA_out_ggaa(cons(T29, T30), T31, X44, X45)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_out_ggaa(T9, T10, X16, X17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17) → U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_in_ggaa(T9, T10, T16, T17))
U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_in_gg(T15, T17))
U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_out_gg(T15, T17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17)
pB_in_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_in_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17))
U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_out_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17)) → pB_out_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, pB_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringeC_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringeC_in_gg(x1, x2)  =  samefringeC_in_gg(x1, x2)
nil  =  nil
samefringeC_out_gg(x1, x2)  =  samefringeC_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
pB_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopherA_in_ggaa(x1, x2, x3, x4)  =  gopherA_in_ggaa(x1, x2)
gopherA_out_ggaa(x1, x2, x3, x4)  =  gopherA_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
pB_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

SAMEFRINGEC_IN_GG(cons(T7, T8), cons(T9, T10)) → U6_GG(T7, T8, T9, T10, pB_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
SAMEFRINGEC_IN_GG(cons(T7, T8), cons(T9, T10)) → PB_IN_GGAAGGAA(T7, T8, X14, X15, T9, T10, X16, X17)
PB_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, X16, X17) → U2_GGAAGGAA(T15, T9, T10, X16, X17, gopherA_in_ggaa(T9, T10, X16, X17))
PB_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, X16, X17) → GOPHERA_IN_GGAA(T9, T10, X16, X17)
GOPHERA_IN_GGAA(cons(T29, T30), T31, X44, X45) → U1_GGAA(T29, T30, T31, X44, X45, gopherA_in_ggaa(T29, cons(T30, T31), X44, X45))
GOPHERA_IN_GGAA(cons(T29, T30), T31, X44, X45) → GOPHERA_IN_GGAA(T29, cons(T30, T31), X44, X45)
PB_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, T16, T17) → U3_GGAAGGAA(T15, T9, T10, T16, T17, gopherA_in_ggaa(T9, T10, T16, T17))
U3_GGAAGGAA(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → U4_GGAAGGAA(T15, T9, T10, T16, T17, samefringeC_in_gg(T15, T17))
U3_GGAAGGAA(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → SAMEFRINGEC_IN_GG(T15, T17)
PB_IN_GGAAGGAA(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → U5_GGAAGGAA(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_in_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17))
PB_IN_GGAAGGAA(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → PB_IN_GGAAGGAA(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17)

The TRS R consists of the following rules:

samefringeC_in_gg(nil, nil) → samefringeC_out_gg(nil, nil)
samefringeC_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, pB_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_in_ggaa(T9, T10, X16, X17))
gopherA_in_ggaa(nil, T22, nil, T22) → gopherA_out_ggaa(nil, T22, nil, T22)
gopherA_in_ggaa(cons(T29, T30), T31, X44, X45) → U1_ggaa(T29, T30, T31, X44, X45, gopherA_in_ggaa(T29, cons(T30, T31), X44, X45))
U1_ggaa(T29, T30, T31, X44, X45, gopherA_out_ggaa(T29, cons(T30, T31), X44, X45)) → gopherA_out_ggaa(cons(T29, T30), T31, X44, X45)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_out_ggaa(T9, T10, X16, X17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17) → U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_in_ggaa(T9, T10, T16, T17))
U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_in_gg(T15, T17))
U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_out_gg(T15, T17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17)
pB_in_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_in_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17))
U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_out_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17)) → pB_out_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, pB_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringeC_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringeC_in_gg(x1, x2)  =  samefringeC_in_gg(x1, x2)
nil  =  nil
samefringeC_out_gg(x1, x2)  =  samefringeC_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
pB_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopherA_in_ggaa(x1, x2, x3, x4)  =  gopherA_in_ggaa(x1, x2)
gopherA_out_ggaa(x1, x2, x3, x4)  =  gopherA_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
pB_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)
SAMEFRINGEC_IN_GG(x1, x2)  =  SAMEFRINGEC_IN_GG(x1, x2)
U6_GG(x1, x2, x3, x4, x5)  =  U6_GG(x5)
PB_IN_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  PB_IN_GGAAGGAA(x1, x2, x5, x6)
U2_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U2_GGAAGGAA(x1, x6)
GOPHERA_IN_GGAA(x1, x2, x3, x4)  =  GOPHERA_IN_GGAA(x1, x2)
U1_GGAA(x1, x2, x3, x4, x5, x6)  =  U1_GGAA(x6)
U3_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U3_GGAAGGAA(x1, x6)
U4_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U4_GGAAGGAA(x1, x4, x5, x6)
U5_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_GGAAGGAA(x10)

We have to consider all (P,R,Pi)-chains

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

SAMEFRINGEC_IN_GG(cons(T7, T8), cons(T9, T10)) → U6_GG(T7, T8, T9, T10, pB_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
SAMEFRINGEC_IN_GG(cons(T7, T8), cons(T9, T10)) → PB_IN_GGAAGGAA(T7, T8, X14, X15, T9, T10, X16, X17)
PB_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, X16, X17) → U2_GGAAGGAA(T15, T9, T10, X16, X17, gopherA_in_ggaa(T9, T10, X16, X17))
PB_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, X16, X17) → GOPHERA_IN_GGAA(T9, T10, X16, X17)
GOPHERA_IN_GGAA(cons(T29, T30), T31, X44, X45) → U1_GGAA(T29, T30, T31, X44, X45, gopherA_in_ggaa(T29, cons(T30, T31), X44, X45))
GOPHERA_IN_GGAA(cons(T29, T30), T31, X44, X45) → GOPHERA_IN_GGAA(T29, cons(T30, T31), X44, X45)
PB_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, T16, T17) → U3_GGAAGGAA(T15, T9, T10, T16, T17, gopherA_in_ggaa(T9, T10, T16, T17))
U3_GGAAGGAA(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → U4_GGAAGGAA(T15, T9, T10, T16, T17, samefringeC_in_gg(T15, T17))
U3_GGAAGGAA(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → SAMEFRINGEC_IN_GG(T15, T17)
PB_IN_GGAAGGAA(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → U5_GGAAGGAA(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_in_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17))
PB_IN_GGAAGGAA(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → PB_IN_GGAAGGAA(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17)

The TRS R consists of the following rules:

samefringeC_in_gg(nil, nil) → samefringeC_out_gg(nil, nil)
samefringeC_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, pB_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_in_ggaa(T9, T10, X16, X17))
gopherA_in_ggaa(nil, T22, nil, T22) → gopherA_out_ggaa(nil, T22, nil, T22)
gopherA_in_ggaa(cons(T29, T30), T31, X44, X45) → U1_ggaa(T29, T30, T31, X44, X45, gopherA_in_ggaa(T29, cons(T30, T31), X44, X45))
U1_ggaa(T29, T30, T31, X44, X45, gopherA_out_ggaa(T29, cons(T30, T31), X44, X45)) → gopherA_out_ggaa(cons(T29, T30), T31, X44, X45)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_out_ggaa(T9, T10, X16, X17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17) → U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_in_ggaa(T9, T10, T16, T17))
U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_in_gg(T15, T17))
U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_out_gg(T15, T17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17)
pB_in_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_in_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17))
U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_out_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17)) → pB_out_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, pB_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringeC_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringeC_in_gg(x1, x2)  =  samefringeC_in_gg(x1, x2)
nil  =  nil
samefringeC_out_gg(x1, x2)  =  samefringeC_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
pB_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopherA_in_ggaa(x1, x2, x3, x4)  =  gopherA_in_ggaa(x1, x2)
gopherA_out_ggaa(x1, x2, x3, x4)  =  gopherA_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
pB_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)
SAMEFRINGEC_IN_GG(x1, x2)  =  SAMEFRINGEC_IN_GG(x1, x2)
U6_GG(x1, x2, x3, x4, x5)  =  U6_GG(x5)
PB_IN_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  PB_IN_GGAAGGAA(x1, x2, x5, x6)
U2_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U2_GGAAGGAA(x1, x6)
GOPHERA_IN_GGAA(x1, x2, x3, x4)  =  GOPHERA_IN_GGAA(x1, x2)
U1_GGAA(x1, x2, x3, x4, x5, x6)  =  U1_GGAA(x6)
U3_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U3_GGAAGGAA(x1, x6)
U4_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U4_GGAAGGAA(x1, x4, x5, x6)
U5_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_GGAAGGAA(x10)

We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 6 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

GOPHERA_IN_GGAA(cons(T29, T30), T31, X44, X45) → GOPHERA_IN_GGAA(T29, cons(T30, T31), X44, X45)

The TRS R consists of the following rules:

samefringeC_in_gg(nil, nil) → samefringeC_out_gg(nil, nil)
samefringeC_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, pB_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_in_ggaa(T9, T10, X16, X17))
gopherA_in_ggaa(nil, T22, nil, T22) → gopherA_out_ggaa(nil, T22, nil, T22)
gopherA_in_ggaa(cons(T29, T30), T31, X44, X45) → U1_ggaa(T29, T30, T31, X44, X45, gopherA_in_ggaa(T29, cons(T30, T31), X44, X45))
U1_ggaa(T29, T30, T31, X44, X45, gopherA_out_ggaa(T29, cons(T30, T31), X44, X45)) → gopherA_out_ggaa(cons(T29, T30), T31, X44, X45)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_out_ggaa(T9, T10, X16, X17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17) → U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_in_ggaa(T9, T10, T16, T17))
U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_in_gg(T15, T17))
U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_out_gg(T15, T17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17)
pB_in_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_in_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17))
U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_out_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17)) → pB_out_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, pB_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringeC_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringeC_in_gg(x1, x2)  =  samefringeC_in_gg(x1, x2)
nil  =  nil
samefringeC_out_gg(x1, x2)  =  samefringeC_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
pB_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopherA_in_ggaa(x1, x2, x3, x4)  =  gopherA_in_ggaa(x1, x2)
gopherA_out_ggaa(x1, x2, x3, x4)  =  gopherA_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
pB_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)
GOPHERA_IN_GGAA(x1, x2, x3, x4)  =  GOPHERA_IN_GGAA(x1, x2)

We have to consider all (P,R,Pi)-chains

(10) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(11) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

GOPHERA_IN_GGAA(cons(T29, T30), T31, X44, X45) → GOPHERA_IN_GGAA(T29, cons(T30, T31), X44, X45)

R is empty.
The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
GOPHERA_IN_GGAA(x1, x2, x3, x4)  =  GOPHERA_IN_GGAA(x1, x2)

We have to consider all (P,R,Pi)-chains

(12) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(13) Obligation:

Q DP problem:
The TRS P consists of the following rules:

GOPHERA_IN_GGAA(cons(T29, T30), T31) → GOPHERA_IN_GGAA(T29, cons(T30, T31))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(14) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • GOPHERA_IN_GGAA(cons(T29, T30), T31) → GOPHERA_IN_GGAA(T29, cons(T30, T31))
    The graph contains the following edges 1 > 1

(15) YES

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

SAMEFRINGEC_IN_GG(cons(T7, T8), cons(T9, T10)) → PB_IN_GGAAGGAA(T7, T8, X14, X15, T9, T10, X16, X17)
PB_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, T16, T17) → U3_GGAAGGAA(T15, T9, T10, T16, T17, gopherA_in_ggaa(T9, T10, T16, T17))
U3_GGAAGGAA(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → SAMEFRINGEC_IN_GG(T15, T17)
PB_IN_GGAAGGAA(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → PB_IN_GGAAGGAA(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17)

The TRS R consists of the following rules:

samefringeC_in_gg(nil, nil) → samefringeC_out_gg(nil, nil)
samefringeC_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, pB_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_in_ggaa(T9, T10, X16, X17))
gopherA_in_ggaa(nil, T22, nil, T22) → gopherA_out_ggaa(nil, T22, nil, T22)
gopherA_in_ggaa(cons(T29, T30), T31, X44, X45) → U1_ggaa(T29, T30, T31, X44, X45, gopherA_in_ggaa(T29, cons(T30, T31), X44, X45))
U1_ggaa(T29, T30, T31, X44, X45, gopherA_out_ggaa(T29, cons(T30, T31), X44, X45)) → gopherA_out_ggaa(cons(T29, T30), T31, X44, X45)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopherA_out_ggaa(T9, T10, X16, X17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
pB_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17) → U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_in_ggaa(T9, T10, T16, T17))
U3_ggaaggaa(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_in_gg(T15, T17))
U4_ggaaggaa(T15, T9, T10, T16, T17, samefringeC_out_gg(T15, T17)) → pB_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T16, T17)
pB_in_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_in_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17))
U5_ggaaggaa(T38, T39, T40, X62, X63, T9, T10, X16, X17, pB_out_ggaaggaa(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17)) → pB_out_ggaaggaa(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, pB_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringeC_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringeC_in_gg(x1, x2)  =  samefringeC_in_gg(x1, x2)
nil  =  nil
samefringeC_out_gg(x1, x2)  =  samefringeC_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
pB_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopherA_in_ggaa(x1, x2, x3, x4)  =  gopherA_in_ggaa(x1, x2)
gopherA_out_ggaa(x1, x2, x3, x4)  =  gopherA_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
pB_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  pB_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)
SAMEFRINGEC_IN_GG(x1, x2)  =  SAMEFRINGEC_IN_GG(x1, x2)
PB_IN_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  PB_IN_GGAAGGAA(x1, x2, x5, x6)
U3_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U3_GGAAGGAA(x1, x6)

We have to consider all (P,R,Pi)-chains

(17) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(18) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

SAMEFRINGEC_IN_GG(cons(T7, T8), cons(T9, T10)) → PB_IN_GGAAGGAA(T7, T8, X14, X15, T9, T10, X16, X17)
PB_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, T16, T17) → U3_GGAAGGAA(T15, T9, T10, T16, T17, gopherA_in_ggaa(T9, T10, T16, T17))
U3_GGAAGGAA(T15, T9, T10, T16, T17, gopherA_out_ggaa(T9, T10, T16, T17)) → SAMEFRINGEC_IN_GG(T15, T17)
PB_IN_GGAAGGAA(cons(T38, T39), T40, X62, X63, T9, T10, X16, X17) → PB_IN_GGAAGGAA(T38, cons(T39, T40), X62, X63, T9, T10, X16, X17)

The TRS R consists of the following rules:

gopherA_in_ggaa(nil, T22, nil, T22) → gopherA_out_ggaa(nil, T22, nil, T22)
gopherA_in_ggaa(cons(T29, T30), T31, X44, X45) → U1_ggaa(T29, T30, T31, X44, X45, gopherA_in_ggaa(T29, cons(T30, T31), X44, X45))
U1_ggaa(T29, T30, T31, X44, X45, gopherA_out_ggaa(T29, cons(T30, T31), X44, X45)) → gopherA_out_ggaa(cons(T29, T30), T31, X44, X45)

The argument filtering Pi contains the following mapping:
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
gopherA_in_ggaa(x1, x2, x3, x4)  =  gopherA_in_ggaa(x1, x2)
gopherA_out_ggaa(x1, x2, x3, x4)  =  gopherA_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
SAMEFRINGEC_IN_GG(x1, x2)  =  SAMEFRINGEC_IN_GG(x1, x2)
PB_IN_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  PB_IN_GGAAGGAA(x1, x2, x5, x6)
U3_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U3_GGAAGGAA(x1, x6)

We have to consider all (P,R,Pi)-chains

(19) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

SAMEFRINGEC_IN_GG(cons(T7, T8), cons(T9, T10)) → PB_IN_GGAAGGAA(T7, T8, T9, T10)
PB_IN_GGAAGGAA(nil, T15, T9, T10) → U3_GGAAGGAA(T15, gopherA_in_ggaa(T9, T10))
U3_GGAAGGAA(T15, gopherA_out_ggaa(T16, T17)) → SAMEFRINGEC_IN_GG(T15, T17)
PB_IN_GGAAGGAA(cons(T38, T39), T40, T9, T10) → PB_IN_GGAAGGAA(T38, cons(T39, T40), T9, T10)

The TRS R consists of the following rules:

gopherA_in_ggaa(nil, T22) → gopherA_out_ggaa(nil, T22)
gopherA_in_ggaa(cons(T29, T30), T31) → U1_ggaa(gopherA_in_ggaa(T29, cons(T30, T31)))
U1_ggaa(gopherA_out_ggaa(X44, X45)) → gopherA_out_ggaa(X44, X45)

The set Q consists of the following terms:

gopherA_in_ggaa(x0, x1)
U1_ggaa(x0)

We have to consider all (P,Q,R)-chains.

(21) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

PB_IN_GGAAGGAA(nil, T15, T9, T10) → U3_GGAAGGAA(T15, gopherA_in_ggaa(T9, T10))


Used ordering: Polynomial interpretation [POLO]:

POL(PB_IN_GGAAGGAA(x1, x2, x3, x4)) = 2·x1 + 2·x2 + 2·x3 + 2·x4   
POL(SAMEFRINGEC_IN_GG(x1, x2)) = 2·x1 + 2·x2   
POL(U1_ggaa(x1)) = x1   
POL(U3_GGAAGGAA(x1, x2)) = 2·x1 + 2·x2   
POL(cons(x1, x2)) = x1 + x2   
POL(gopherA_in_ggaa(x1, x2)) = x1 + x2   
POL(gopherA_out_ggaa(x1, x2)) = x1 + x2   
POL(nil) = 2   

(22) Obligation:

Q DP problem:
The TRS P consists of the following rules:

SAMEFRINGEC_IN_GG(cons(T7, T8), cons(T9, T10)) → PB_IN_GGAAGGAA(T7, T8, T9, T10)
U3_GGAAGGAA(T15, gopherA_out_ggaa(T16, T17)) → SAMEFRINGEC_IN_GG(T15, T17)
PB_IN_GGAAGGAA(cons(T38, T39), T40, T9, T10) → PB_IN_GGAAGGAA(T38, cons(T39, T40), T9, T10)

The TRS R consists of the following rules:

gopherA_in_ggaa(nil, T22) → gopherA_out_ggaa(nil, T22)
gopherA_in_ggaa(cons(T29, T30), T31) → U1_ggaa(gopherA_in_ggaa(T29, cons(T30, T31)))
U1_ggaa(gopherA_out_ggaa(X44, X45)) → gopherA_out_ggaa(X44, X45)

The set Q consists of the following terms:

gopherA_in_ggaa(x0, x1)
U1_ggaa(x0)

We have to consider all (P,Q,R)-chains.

(23) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes.

(24) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PB_IN_GGAAGGAA(cons(T38, T39), T40, T9, T10) → PB_IN_GGAAGGAA(T38, cons(T39, T40), T9, T10)

The TRS R consists of the following rules:

gopherA_in_ggaa(nil, T22) → gopherA_out_ggaa(nil, T22)
gopherA_in_ggaa(cons(T29, T30), T31) → U1_ggaa(gopherA_in_ggaa(T29, cons(T30, T31)))
U1_ggaa(gopherA_out_ggaa(X44, X45)) → gopherA_out_ggaa(X44, X45)

The set Q consists of the following terms:

gopherA_in_ggaa(x0, x1)
U1_ggaa(x0)

We have to consider all (P,Q,R)-chains.

(25) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(26) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PB_IN_GGAAGGAA(cons(T38, T39), T40, T9, T10) → PB_IN_GGAAGGAA(T38, cons(T39, T40), T9, T10)

R is empty.
The set Q consists of the following terms:

gopherA_in_ggaa(x0, x1)
U1_ggaa(x0)

We have to consider all (P,Q,R)-chains.

(27) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

gopherA_in_ggaa(x0, x1)
U1_ggaa(x0)

(28) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PB_IN_GGAAGGAA(cons(T38, T39), T40, T9, T10) → PB_IN_GGAAGGAA(T38, cons(T39, T40), T9, T10)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(29) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • PB_IN_GGAAGGAA(cons(T38, T39), T40, T9, T10) → PB_IN_GGAAGGAA(T38, cons(T39, T40), T9, T10)
    The graph contains the following edges 1 > 1, 3 >= 3, 4 >= 4

(30) YES